// import { Select } from "antd"
import { FC } from "react"
import { useSelector } from "react-redux"

import { SFormItem } from "@/components/common"
import StyleSelect from "@/components/common/styleSelect"
import { useLocale } from "@/locales"
import { AppState } from "@/stores"

// eslint-disable-next-line @typescript-eslint/no-unused-vars
export const OrderStatusSelect: FC<{
	label?: string
}> = props => {
	const { label } = props
	const { formatMessage, newFormat } = useLocale()

	const { allDictLists } = useSelector((state: AppState) => state.config)
	const options = allDictLists["patchAdjustStatus"].map((item: { label: string; value: any }) => {
		return {
			label: newFormat(item.label),
			value: item.value
		}
	})

	return (
		<SFormItem name="orderStatus" label={formatMessage({ id: label || "funds.order_status" })}>
			<StyleSelect placeholder={formatMessage({ id: "label.select_all" })} allowClear options={options} />
		</SFormItem>
	)
}
